#!/usr/bin/env tclsh

#######################
# 优先级

#-a         负a             int,float
#!a         非a             int,float 
#~a         按位取反        int
#a*b        *               int,float
#a/b        /               int,float
#a%b        %               int 
#a+b        +               int,float
#a-b        -               int,float
#a<<b       左移            int
#a>>b       右移            int
#a<b        <               int,float,string
#a>b        >               int,float,string 
#a<=b       <=              int,float,string
#a>=b       >=              int,float,string 
#a==b       ==              int,float,string
#a!=b       !=              int,float,string 
#a&b        &               int 
#a|b        |               int
#a&&b       &&              int,float
#a||b       ||              int,float
#a?b:c      选择语句         a:int,float


#浮点数相除结果为浮点数
set a 12.3
set b [expr $a/2]
puts "$a/2=$b"  


set c 13
puts "$c%2=[expr $c%2]"  

set d [expr $a>12?1:0]
puts "$d"



